The Absolute Beginners Guide To Amos ------------------------------------- Chapter sixteen --------------- I am now going to catch up on some system commands that may be of use to you in the future. CLOSE WORKBENCH --------------- Using this command at the very start of your program will release around 40k of memory for your programs use, extra useful if you have only 512k. CLOSE EDITOR ------------ Use this as well to save an additional 28k with no side effects at all to the running of your program. Why this isn`t automatic I don`t know? F=FREE ------ F returns the amount of space available for your variables, see next command if you are running or have run out of space. SET BUFFER N ------------ Sets the size of your variable area in kilobytes, so if you get an ERROR OUT OF VARIABLE SPACE (OR STRING SPACE) then use FREE to find out the space left and then add 5k or so at a time until the errors stop. BREAK ON/OFF ------------ Usually you can break into any Amos program using CTRL+C. Setting BREAK to ON disables this. Be careful though as unless you have a way to quit your program you may never gain access to it again. Basically only use in a completely finished program. BREAK ON can speed up your program slightly but not noticeably. LED ON/OFF ---------- Turn OFF or ON the highpass filter which can enhance some tracker music and samples, experiment. Well that`s all for now, time to recap on the latest commands we have learnt over the last three chapters and have another self test quiz. BORDER$(ZONE$("TEXT",id,pat) Set up text/box menus. BREAK ON/OFF Set or unset the CTRL+C break. CLOSE EDITOR Save 28k of memory. CLOSE WORKBENCH Save 40k of memory. FREE F=FREE, F will equal free space in vars area. GOSUB Jump to a subroutine, see RETURN. LED OFF/ON Switch high pass filter OFF/ON. MOUSE ZONE Detect which defined zone mouse pointer is over. RESERVE ZONE Used to reserve space for zones (and ZONE$) RETURN RETURN from a subroutine. See gosub. SAM LOOP Force a sample to loop continuously. SAM PLAY Play a sample from sample bank. SAY Use the Amiga`s in built speech, SAY "HELLO" SCREEN n Tell Amos the which screen to use. SCREEN DISPLAY Position a screen. SCREEN OFFSET Used mainly in hardware scrolling. SCREEN OPEN Literally OPEN a SCREEN. SET BUFFER Set the length of the variables area. SET TALK Set sex,mode,pitch,rate of SAY command. SET ZONE Define the screen zones for mouse interaction. UNDER ON/OFF Set text underlining ON or OFF. WHILE WEND loop Will execute all commands between WHILE and WEND until a condition is met. -------------------------------------------------------------------------- Self test quiz number three <---------------------------> Q 1. What file would you need on your disk to use the SAY command? a) Speak.library b) Narrator.Device c) Amos.Amos Q 2. What command does GOSUB expect to find eventually? a) RETURN b) GOTO c) SET TALK Q 3. What will happen if we ran the following program? UNDER ONF: PRINT "HELLO": UNDER OFF a) A syntax error b) It would print the word HELLO c) It would print the word. Q 4. How much memory would CLOSE WORKBENCH save? a) 28k b) 58k c) 40k Q 5. Which command would you use to position a screen? a) Screen open b) Screen offset c) screen display Q 6. What is the missing part of this command? SCREEN OPEN 320,200,16,? a) Lowres or Hires b) Res c) 256 Q 7. What is the command WHILE expects to meet sooner or later? a) GOTO b) WEND c) NEXT Q 8. What command does SET TALK effect? a) TALK b) SHOOT c) SAY Q 9. How would you protect your program from the CTRL+C user break? a) BREAK UP b) BREAK ON c) BREAK OFF Q10. What command would you use to expand the variables area? a) SLAP BUTTER b) SET BLITTER c) SET BUFFER Answers next chapter. End of chapter sixteen.